const crypto = require('crypto')
// 1. 定义密钥
const secret_key = '1808A'

// 2. 定义加密规则
const md5 = (pwd) => {
  return crypto.createHash('md5').update(pwd).digest('hex')
}

// 3. 定义加密函数

const getPassword = (pwd) => {
  return md5(`password=${pwd}&secret_key=${secret_key}`)
}

exports.getPassword = getPassword

// console.log(getPassword('124'))